//
//  HYInfoTool.m
//  HaiYue
//
//  Created by skyline on 2018/2/6.
//  Copyright © 2018年 skyline. All rights reserved.
//

#import "HYInfoTool.h"
@interface HYInfoTool()
@property (nonatomic, strong) HYButton *button;
@end

@implementation HYInfoTool
- (instancetype)init
{
    self = [super init];
    if (self)
    {
        self.backgroundColor = [UIColor whiteColor];
        self.button.hidden = NO;
    }
    return self;
}

- (HYButton *)button
{
    if (!_button)
    {
        _button = [[HYButton alloc] initWithTitle:@"我来说两句" backColor:THEME_COLOR];
        [_button addTarget:self action:@selector(actionForHYInfoTool:) forControlEvents:UIControlEventTouchUpInside];
        [self addSubview:_button];
        [_button mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.mas_offset(UIEdgeInsetsMake(GAP, GAP, GAP, GAP));
        }];
    }
    return _button;
}

- (void)actionForHYInfoTool:(HYButton *)sender
{
    [self sendActionsForControlEvents:UIControlEventTouchUpInside];
}
/*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.
 - (void)drawRect:(CGRect)rect {
 // Drawing code
 }
 */

@end
